<extend name="./Public/main" />
<block name="main">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>添加(修改)组</h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" action="{:U('Power/insertgroup')}">
                            <input name="id" type="hidden" value="{$res.id}">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">组名称</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="title" value="{$res.title}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">状态</label>

                                <div class="col-sm-10">
                                    <div class="radio">
                                        <label>
                                            <input type="radio"  value="1" id="optionsRadios1" name="status" <if condition="$res.status eq 1"> checked </if> >启用
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" value="0" id="optionsRadios2" name="status" <if condition="$res.status eq 0"> checked </if> >关闭
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">权限</label>
                                <div class="col-sm-6">
					                <div class="ibox float-e-margins" style="border: 0px solid #fff">
					                    <div class="ibox-content" style="border: 0px solid #fff;padding-left:0px">
					                        <table class="table" >
					                            <tbody>
					                              <volist name="category_list" id="vo">
					                                <tr>
					                                    <td style="border: 0px solid #fff;">
					                                      <label class="checkbox-inline">
                                                            {$vo['delimiter']}&nbsp{$vo['title']}<input type="checkbox" value="{$vo['id']}" name="rules[]" <if condition="substr_count($res['rules'],$vo['id']) neq 0">checked</if> id="{$vo['id']}" style="margin-left:20px">
                                                          </label>
					                                    </td>
					                                </tr>
					                              </volist>
					                            </tbody>
					                        </table>
					
					                    </div>
					                </div>
					            </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">确定</button>
                                    <button class="btn btn-white" type="submit">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>